<template>
  <div class="content">
    <div class="header">
      <div style="width:20px;height:10px;"></div>
      <el-button type="primary" @click.native="setstatus">
        <i class="el-icon-plus"></i>新建排期
      </el-button>
    </div>
    <div class="seachinfo">
      <div class="oneitem">
        <div class="oneitemname">排期时间</div>
        <el-date-picker
          style="width:250px;"
          v-model="value1"
          type="daterange"
          range-separator="至"
          start-placeholder="开始日期"
          end-placeholder="结束日期"
        ></el-date-picker>
      </div>

      <div class="oneitem">
        <div class="oneitemname">媒介</div>
        <el-select v-model="value" style="width:250px;" placeholder="请选择">
          <el-option
            v-for="item in options"
            :key="item.value"
            :label="item.label"
            :value="item.value"
          ></el-option>
        </el-select>
      </div>
      <div class="oneitem">
        <div class="oneitemname">频道</div>
        <el-select v-model="value" style="width:250px;" placeholder="请选择">
          <el-option
            v-for="item in options"
            :key="item.value"
            :label="item.label"
            :value="item.value"
          ></el-option>
        </el-select>
      </div>
      <div class="oneitem">
        <div class="oneitemname">节目</div>
        <el-select v-model="value" style="width:250px;" placeholder="请选择">
          <el-option
            v-for="item in options"
            :key="item.value"
            :label="item.label"
            :value="item.value"
          ></el-option>
        </el-select>
      </div>
        <div class="oneitem">
        <el-button type="primary" icon="el-icon-search" style="margin-left:30px;">搜索</el-button>
      </div>
    </div>
    <div class="warps">
      <el-collapse v-model="activeNames" @change="handleChange">
        <el-collapse-item title="2120-2-2" name="1">
           <template slot="title">
             <div class="title-top">
               <div class="top-left">
                 <span class="text">2019年1月排期</span>
               </div>
               <div class="top-left top-right ">
                 <el-button type="primary" icon="el-icon-edit">编辑</el-button>
                 <el-button type="primary" icon="el-icon-upload2">输出</el-button>
               </div>
             </div>
            
          </template>
          <el-table  :cell-style="$rowstyle"
        :header-cell-style="$headerstyle" :data="tableData" border style="width: 100% margin-top:20px;">
            <el-table-column type="index" label="序号" align="center" width="50"></el-table-column>
            <el-table-column prop="date" label="城市" align="center" width="150"></el-table-column>
            <el-table-column prop="name" label="广告主" align="center"></el-table-column>
            <el-table-column prop="province" label="播放日期" align="center" width="120"></el-table-column>
            <el-table-column label="操作" align="center" width="100">
              <template slot-scope="scope">
                <el-button @click="handleClick(scope.row)" type="text" size="small">素材名称</el-button>
              </template>
            </el-table-column>
          </el-table>
          <div class="block">
            <el-pagination
              @size-change="handleSizeChange"
              @current-change="handleCurrentChange"
              :current-page.sync="currentPage1"
              :page-size="100"
              layout="total, prev, pager, next"
              :total="1000"
            ></el-pagination>
          </div>
        </el-collapse-item>
      </el-collapse>
    </div>
       <div class="prop" v-if="addstatus">
      <div style="height:150px;width:100%"></div>
      <div class="warpprop" style="width:900px;height:600px;">
        <div class="propheader">
          新建排期
          <p class="close1" @click="setstatus">关闭</p>
        </div>
        <div class="contenthint1">
         <div class="itemtow">
           <div class="oneitemname">排期时间</div>
        <el-date-picker
          style="width:250px;"
          v-model="value1"
          type="daterange"
          range-separator="至"
          start-placeholder="开始日期"
          end-placeholder="结束日期"
        ></el-date-picker>
         </div>
            <div class="itemtow">
           <div class="oneitemname">广告主</div>
       <el-input style="width:250px;"></el-input>
         </div>
          <div class="itemtow">
        <el-button type="primary" style="margin-left:30px;" icon="el-icon-search">搜索</el-button>
         </div>
        </div>
        <div class="selectlist">
           <el-table
    ref="multipleTable"
    border
    :data="tableData"
    tooltip-effect="dark"
    style="width: 100%"
     :cell-style="$rowstyle"
        :header-cell-style="$headerstyle"
    @selection-change="handleSelectionChange">
    <el-table-column
      type="selection"
      align="center"
      width="55">
    </el-table-column>
    <el-table-column
      label="合同号"
      align="center"
      width="100">
      <template slot-scope="scope">{{ scope.row.date }}</template>
    </el-table-column>
  <el-table-column
      label="合同名称"
      align="center"
      width="120">
      <template slot-scope="scope">{{ scope.row.date }}</template>
    </el-table-column>
     <el-table-column
      label="周期"
      align="center"
      width="120">
      <template slot-scope="scope">{{ scope.row.date }}</template>
    </el-table-column>
     <el-table-column
      label="广告主"
      align="center"
      width="120">
      <template slot-scope="scope">{{ scope.row.date }}</template>
    </el-table-column>
     <el-table-column
      label="合同金额（万元）"
      align="center"
      width="100">
      <template slot-scope="scope">{{ scope.row.date }}</template>
    </el-table-column>
     <el-table-column
      label="备注"
      align="center"
      width="120">
      <template slot-scope="scope">{{ scope.row.date }}</template>
    </el-table-column>
     <el-table-column
      label="制作时间"
      align="center"
      >
      <template slot-scope="scope">{{ scope.row.date }}</template>
    </el-table-column>

    
  </el-table>
     <el-pagination
      @size-change="handleSizeChange"
      @current-change="handleCurrentChange"
      :current-page.sync="currentPage1"
      :page-size="100"
      layout="prev, pager, next, jumper"
      :total="1000">
    </el-pagination>
        </div>
        <div class="raidoandsave">
          <el-checkbox v-model="checked">包含不可用资源</el-checkbox>
          <el-button type="primary" style="margin-top:20px;">制作排期</el-button>
        </div>
      </div>
    </div>
       <div class="prop" v-if="seestatus">
      <div style="height:150px;width:100%"></div>
      <div class="warpprop" style="width:500px;height:330px;">
        <div class="propheader">
          查看
          <p class="close1" @click="setsee">关闭</p>
        </div>
        <div class="versions">
             <el-tabs :tab-position="'left'" :stretch="false">
    <el-tab-pane label="版本一"> <div class="versionsright"></div></el-tab-pane>
    <el-tab-pane label="版本二"> <div class="versionsright"></div></el-tab-pane>
    <el-tab-pane label="版本三"> <div class="versionsright"></div></el-tab-pane>
    <el-tab-pane label="版本四"> <div class="versionsright"></div></el-tab-pane>
  </el-tabs>
         <!-- <div class="versionsright"></div> -->
        </div>
        <div class="closesee">  <el-button type="primary">关闭</el-button>
 </div>
        
      </div>
    </div>
  </div>
</template>
<script>
export default {
  data() {
    return {
      value1: "",
      currentPage1: 1,
      activeNames: ["1"],
      options: [
        {
          value: "选项1",
          label: "黄金糕"
        },
        {
          value: "选项2",
          label: "双皮奶"
        },
        {
          value: "选项3",
          label: "蚵仔煎"
        },
        {
          value: "选项4",
          label: "龙须面"
        },
        {
          value: "选项5",
          label: "北京烤鸭"
        }
      ],
      value: "",
      checked: true,
      tableData: [
        {
          date: "2016-05-02",
          name: "王小虎",
          province: "上海",
          city: "普陀区",
          address: "上海市普陀区金沙江路 1518 弄",
          zip: 200333
        },
        {
          date: "2016-05-04",
          name: "王小虎",
          province: "上海",
          city: "普陀区",
          address: "上海市普陀区金沙江路 1517 弄",
          zip: 200333
        },
        {
          date: "2016-05-01",
          name: "王小虎",
          province: "上海",
          city: "普陀区",
          address: "上海市普陀区金沙江路 1519 弄",
          zip: 200333
        },
        {
          date: "2016-05-03",
          name: "王小虎",
          province: "上海",
          city: "普陀区",
          address: "上海市普陀区金沙江路 1516 弄",
          zip: 200333
        }
      ],
      addstatus:false,
      seestatus:false
    };
  },
  methods: {
    setstatus(){
this.addstatus=!this.addstatus
    },
      setsee(){
this.seestatus=!this.seestatus
    },
    handleSelectionChange(e){
console.log(e)
    },
    handleChange(val) {
      console.log(val);
    },
    handleClick(row) {
      console.log(row);
      this.setsee()
    },

    handleCurrentChange(e) {
      console.log(e);
    },
    handleSizeChange(e) {
      console.log(e);
    }
  }
};
</script>
<style lang="scss" scope>
.warps {
  width: 97%;
  margin: 0 auto;
  margin-top: 20px;
}
.header {
  height: 40px;
  width: 97%;
  display: flex;
  margin: 0 auto;
  align-items: center;
  flex-direction: row-reverse;
}
.Search {
  display: flex;
  align-items: center;
  margin-left: 30px;
}
.seachinfo {
  width: 97%;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  .oneitem {
    display: flex;
    margin-top: 20px;
    align-items: center;
    flex-direction: row;
    .oneitemname {
      width: 100px;
      margin-left: 20px;
    }
  }
}
.prop {
  width: calc(100% - 210px);
  height: 100%;
  position: fixed;
  top: 0;
  // background: red;
  background: rgba($color: #000000, $alpha: 0.5);
  z-index: 998;
}
.propheader {
  height: 46px;
  width: 100%;
  background: rgba(242, 242, 242, 1);
  border-top-right-radius: 10px;
  border-top-left-radius: 10px;
  line-height: 46px;
  text-align: center;
  position: relative;
}
.close1 {
  position: absolute;
  right: 10px;
  top: -15px;
  color: #169bd5;
}
.warpprop {
  width: 600px;
  height: 450px;
  // background: blue;
  background: #fff;
  margin: 0 auto;
  border-radius: 10px;
  .contenthint1{
    width: 95%;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    .itemtow{
      display: flex;
      align-items: center;
      margin-top: 20px;
      .oneitemname{
        width: 100px;
        margin-left: 20px;
      }
    }
  }
  .selectlist{
    width: 95%;
    margin: 0 auto;
    margin-top: 20px;
  }
  .raidoandsave{
    width: 150px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    height: 100px;
  }
  .versions{
    // display: flex;
    width: 97%;
    margin: 0 auto;
    margin-top: 10px;
    // .versionsleft{
    //   flex: 1;
    // }
    /deep/ .el-tabs__nav-scroll{
      max-width: 170px;
    }
    .versionsright{
      width: 300px;
      height: 200px;
      background: red;
    }
  }
  .closesee{
    width: 50px;
    margin: 0 auto;
    margin-top: 20px;
  }
}
.title-top{
  width: 100%;
  height: 100%;
  // background: red;
  display: flex;
  justify-content: space-between;
  align-items: center;
  .top-left{
    display: flex;
    .text{
      font-size: 14px;
      text-decoration: underline;
      color: blue;
    }
    .hint{
      padding: 5px 5px;
    }
  }
}
</style>